<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="com.bss.dao.LoginDao" %>
<%@page import="java.util.ArrayList" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%

ArrayList<String> list= LoginDao.loadUserNames();
String status="";
String str1=request.getParameter("q").toString();


for(int i=0;i<list.size();i++)
{
	String str=list.get(i);

	
	if(str.compareToIgnoreCase(str1)==0)
	{
		status="<input type='hidden' name='invalidusername' value='"+str1+"' >User ID Already Present";
		session.setAttribute("newuser",false);
		break;
	}
	session.removeAttribute("newuser");
}


response.getWriter().write(status);
 

%>


</body>
</html>